from typing import List
#https://leetcode-cn.com/problems/number-of-good-pairs/submissions/
#1512. 好数对的数目
class Solution:
    def numIdenticalPairs(self, nums: List[int]) -> int:
            # for k,v in enumerate(nums)
        num=0
        for i in range(len(nums)):
            for k in  nums[i+1:]:
                if nums[i]==k:
                   num+=1
        print(num)
        return num

if __name__ == '__main__':
    Solution().numIdenticalPairs([1,2,3,1,1,3])
